package com.board.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.List;
//用户创建堂食订单

@Data
@ApiModel(value = "创建堂食订单参数对象")
public class SeatOrderForm {
    @ApiModelProperty("备注")
    private String remarks;
    @ApiModelProperty("餐厅id")
    @NotNull(message = "餐厅id不能为空")
    @Min(value = 0,message = "餐厅id不能小于0")
    private Integer canteenId;
    @ApiModelProperty("取餐人")
    @NotNull(message = "取餐人不能为空")
    private String getUser;
    @ApiModelProperty("商店id")
    @NotNull(message = "商店id不能为空")
    @Min(value = 0,message = "商店id不能小于0")
    private Integer storeId;
    @ApiModelProperty("订单选择的菜品id和数量的集合")
    @NotNull(message = "订单选择的菜品id和数量的集合不能为空")
    @Valid
    @Size(min = 1,max = 30,message = "订单选择的菜品id和数量的集合最少为1最大为30")
    private List<FoodOrderForm> foodDtoList;

}
